package cn.school.controller.studyManage;

import cn.school.common.api.CommonResult;
import cn.school.common.exception.ApiException;
import cn.school.studyManage.dto.StudentBehaviorDataDTO;
import cn.school.studyManage.service.StudentBehaviorDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("student/behavior/data")
public class StudentBehaviorDataController {

    @Autowired
    StudentBehaviorDataService behaviorDataService;

    @PostMapping("/createStuBehaviorData")
    public CommonResult createStuBehaviorData (@RequestBody StudentBehaviorDataDTO dto)throws ApiException {
        boolean flag = behaviorDataService.createStuBehaviorData(dto);
        if(flag){
            return CommonResult.success();
        }
        return CommonResult.failed("failed");
    }

}
